package com.example.design.factory.interfactory.service.Impl;

import com.example.design.factory.FruitType;
import com.example.design.factory.interfactory.service.FruitFactory;
import com.example.design.factory.service.Fruit;
import com.example.design.factory.service.impl.BananaImpl;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Author: duk
 * @Date: 2021/12/8 13:57
 * @Description:
 */
@Component
public class BananaFruitFactory implements FruitFactory {
    @Resource
    private BananaImpl banana;
    @Override
    public Fruit getFruit(FruitType fruitType) {
        return banana;
    }
}
